﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Legend.Component.Interface
{
    public abstract class IDamaging : IComponent
    {
        public enum DamageType
        {
            God = 0x0,
            Weapon = 0x01,
            EnemyFriendly = 0x02,
            HeroFriendly = 0x04,
            OnlyWithWeapon = 0x08,
            Hero = 0x10,
            Box = 0x20,
            PowerBall = 0x40,
        };
        public enum ResolveResult
        {
            Disappear = 0x00000001,
            Continue = 0x00000002,
        };

        Legend.Object.GameObject owner;
        DamageType damageType = DamageType.EnemyFriendly;
        float damage = 0;
 
        public Legend.Object.GameObject Owner
        {
            get { return owner; }
            set { owner = value; }
        }
        public System.Type UniqueType
        {
            get { return typeof(IDamaging); }
        }

        public DamageType DamageDisposition
        {
            get { return damageType; }
            set { damageType = value; }
        }

        public float Damage
        {
            get { return damage; }
            set { damage = value; }
        }

        public abstract string Status
        {
            get;
        }

        public abstract ResolveResult ResolveDamaging(IDamaging.DamageType fromDisposition, float fromDamage, string fromStatus);
        
    }
}
